import request from '@/router/axios';
// 获取列表
export const getList = (current, size, params) => {
  return request({
    url: '/api/blade-sale/productionequipment/page',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

// 详情
export const detail = (id) => {
  return request({
    url: '/api/blade-sale/productionequipment/detail',
    method: 'get',
    params: {
      id
    }
  })
}

// 保存
export const save = (data, ids) => {
  return request({
    url: '/api/blade-sale/productionequipment/save',
    method: 'post',
    data: data,
    params: {
      ids
    }
  })
}

// 修改
export const update = (data, ids) => {
  return request({
    url: '/api/blade-sale/productionequipment/update',
    method: 'post',
    data: data,
    params: {
      ids
    }
  })
}

//批量删除
export const remove = (ids) => {
  return request({
    url: '/api/blade-sale/productionequipment/remove',
    method: 'post',
    params: {
      ids
    }
  })
}

// 设备列表
export const pullEptList = (materialType) => {
  return request({
    url: '/api/hg-public/equipmentinfo/findAll',
    method: 'get',
    params: {
      materialType
    }
  })
}

//加工工序列表
export const procedureList = () => {
  return request({
    url: '/api/hg-public/procedure/list',
    method: 'get',
    params: {
    }
  })
}

//获取基础信息生产设备列表
export const getProductionEquipmentList = () => {
  return request({
      url: '/api/blade-sale/productionequipment/list',
      method: 'get',
      params: {
      }
  })
}
//获取所需设备
export const getListByProcessMachine= (processMachine) => {
  return request({
      url: '/api/blade-sale/productionequipment/getListByProcessMachine',
      method: 'get',
      params: {
        processMachine
      }
  })
}